<!DOCTYPE html>
<html>

<head>
    <title>黑马顺风车</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../css/jquery.mobile-1.4.5.min.css">
    <script src="../js/jquery-1.11.3.min.js"></script>
    <script src="../js/jquery.mobile-1.4.5.min.js"></script>
    <link rel="stylesheet" href="../css/common.css" />
    <script type="text/javascript" src="../js/common.js"></script>
    <style>
        html,
        body {
            padding: 0;
            margin: 0;
        }

        table .h {
            width: 100px;
            height: 50px;
            font-weight: bold;
        }

        img {
            width: 100%;
            height: 100%;
            max-height: 180px;
        }
        .ui-icon-carat-r {
            line-height:20px;
        }
    </style>
    <script>
        $(function () {

            $('.person-img').attr('src',current_user.avatar);
            $('#driverName').text((current_user.useralias == '') ? current_user.username : current_user.useralias);
            $('#valid').text((current_user.status == 1) ? '已完成' : '未完成');
            $('#driver').text((current_user.role == 1) ? '已完成' : '未完成');

            var roleName = (localStorage.getItem('current_role') == '0' ? 'user' : 'driver');
            $('.role').each(function(){
                $(this).attr('href','../'+roleName+'/'+$(this).attr('href'));
            });
            $('li').removeClass('ui-first-child');
        })
        function logout() {
            localStorage.clear();
            toUrl('/web/login.html');
        }
    </script>
</head>

<body>
    <div id="template" style="display: none;">
        
    </div>

    <div data-role="page" id="pageone">
        <div data-role="header" data-position="fixed" data-tap-toggle="false">
            <h1>个人中心</h1>
        </div>
        <ul data-role="listview" data-inset="true" id="defaultpanel" style="margin:15px;">
            <li>
                <a href="#" class="ui-btn"
                    style="border-top-left-radius: 5px; border-top-right-radius: 5px; background-color:#ddd;">
                    <img class="person-img" src=""
                        style="width:70px;height:70px;margin-top:25px;margin-left:10px;">
                    <h2 id="driverName" id="useralias"></h2>
                    <p></p>
                    <p><span>实名认证：</span> <span style="color:darkgoldenrod" id="valid">未完成</span></p>
                    <p></p>
                    <p><span>车主认证：</span> <span style="color:darkgoldenrod" id="driver">已完成</span></p>
                </a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('alterPwd.html')">修改密码</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('alterPhoto.html')">修改头像</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('alterPaycode.html')">收款码</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('userEdit.html')">完善资料</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('carInfo.html')">车辆信息</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('userVerify.html')">实名认证</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('carVerify.html')">车主认证</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('accountInfo.html')">行程统计</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:toUrl('userMsg.html')">我的消息</a>
            </li>
            <li>
                <a data-ajax="false" href="javascript:logout();">退出登录</a>
            </li>
        </ul>
        <div data-role="footer" data-position="fixed" data-tap-toggle="false">
            <div data-role="navbar" style="margin: 0;" id="footerLink">
                <ul>
                    <li><a href="user.html" data-ajax="false" data-icon="home" class="role">首页</a></li>
                    <li><a href="trip.html" data-ajax="false" data-icon="grid" class="role">我的行程</a></li>
                    <li><a href="order.html" data-ajax="false" data-icon="bullets" class="role">我的订单</a></li>
                    <li><a href="userCenter.html" data-ajax="false" data-icon="user" class="ui-btn-active">个人中心</a></li>
                </ul>
            </div>
        </div>

    </div>

</body>

</html>